package com.danbay.cloud.device.entity;

import com.baomidou.mybatisplus.annotations.TableId;
import com.baomidou.mybatisplus.annotations.TableName;
import com.baomidou.mybatisplus.enums.IdType;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.util.Date;

/**
 *
 * @author SJG
 * @date 2017/10/17
 * 能源消耗记录
 */
@Data
@Builder
@AllArgsConstructor
@NoArgsConstructor
@TableName("energy_consumption")
public class EnergyConsumption {

    @TableId(type = IdType.AUTO)
    private Long id;

    /**
     * 设备id
     */
    private Long energyDevice;

    /**
     * 读数
     * 上报的电表或水表的读数
     */
    private Double meterCount;

    /**
     * 数据获取时间
     */
    private Date readTime;

    private Integer year;

    private Integer month;

    private Integer day;

    private Integer hour;

    /**
     * 每小时耗能（当前小时减去上一个小时）
     */
    private Double consumption;

    /**
     * 数据来源  0或空:从云中拿到，1：从中控中拿到,2 从前置机coap服务器过来
     */
    private Integer dataSource;

    private Integer minute;
}
